﻿@page "/Admin/Sql"
@using BlazorAdmin.Models
@using BlazorAdmin.Web.Shared.Components
@using BlazorAdmin.Web.Shared.Models

<AdminTable TItem=DBLog IsPagination=true CustomerSearchModel=@TableSearchModel SortString=@SortString
            ShowDefaultButtons=false ShowExtendButtons=false ShowCardView=false>
    <TableColumns>
        <TableColumn @bind-Field="context.UserName" Width="120" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.Action" Width="150" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.SQL" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.LogTime" Width="150" Filterable="true" Searchable="true" Sortable="true" FormatString=@SysConsts.FormatTime></TableColumn>
    </TableColumns>
    <CustomerSearchTemplate Context="v">
        @if (v is DBLogSearchModel m)
        {
            <DBLogSearch @bind-Value="m"></DBLogSearch>
        }
    </CustomerSearchTemplate>
</AdminTable>